home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / scl120.arc / SSG.DOC < prev    next >
Text File  |  1990-09-07  |  72KB  |  1,897 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. [27][6]
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.                       SSG - SCREEN EDITOR AND PROGRAM GENERATOR
  28.  
  29.                                   REFERENCE MANUAL
  30.  
  31.                             COPYRIGHT (C) 1989, 1990 BY:
  32.  
  33.                                 JOSE RODRIGUEZ ALVIRA
  34.                                          AND
  35.                                    JOSE R. LEBRON
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.                          SSG Version 2.0 - Reference Manual
  43.  
  44.  
  45.  
  46.                                   TABLE OF CONTENTS
  47.  
  48.           OVERVIEW . . . . . . . . . . . . . . . . . . . . . . . . . .    1
  49.  
  50.           HARDWARE REQUIREMENTS  . . . . . . . . . . . . . . . . . . .    1
  51.  
  52.           INSTALLING SSG . . . . . . . . . . . . . . . . . . . . . . .    1
  53.  
  54.           STARTING SSG . . . . . . . . . . . . . . . . . . . . . . . .    1
  55.  
  56.           THE STATUS BOX . . . . . . . . . . . . . . . . . . . . . . .    1
  57.                Moving the STATUS BOX:  . . . . . . . . . . . . . . . .    2
  58.                Turning STATUS BOX on and off:  . . . . . . . . . . . .    2
  59.                STATUS BOX First Line:  . . . . . . . . . . . . . . . .    2
  60.                STATUS BOX Second Line: . . . . . . . . . . . . . . . .    2
  61.                STATUS BOX third, fourth fifth and sixth Lines: . . . .    3
  62.  
  63.           USING SSG  . . . . . . . . . . . . . . . . . . . . . . . . .    3
  64.                Writing a character or symbol:  . . . . . . . . . . . .    3
  65.                Moving the cursor:  . . . . . . . . . . . . . . . . . .    4
  66.                Changing the cursor movement direction: . . . . . . . .    4
  67.                Block operations: . . . . . . . . . . . . . . . . . . .    4
  68.  
  69.           SSG MENUS  . . . . . . . . . . . . . . . . . . . . . . . . .    5
  70.                Main Menu . . . . . . . . . . . . . . . . . . . . . . .    5
  71.                     Load . . . . . . . . . . . . . . . . . . . . . . .    5
  72.                     Save . . . . . . . . . . . . . . . . . . . . . . .    6
  73.                     New  . . . . . . . . . . . . . . . . . . . . . . .    6
  74.                     Save SSG 1.0 . . . . . . . . . . . . . . . . . . .    6
  75.                     Options  . . . . . . . . . . . . . . . . . . . . .    6
  76.                     Quit . . . . . . . . . . . . . . . . . . . . . . .    6
  77.                Edit Menu . . . . . . . . . . . . . . . . . . . . . . .    6
  78.                     Center Block . . . . . . . . . . . . . . . . . . .    7
  79.                     Copy Block . . . . . . . . . . . . . . . . . . . .    7
  80.                     Delete Block . . . . . . . . . . . . . . . . . . .    7
  81.                     Fill Block . . . . . . . . . . . . . . . . . . . .    8
  82.                     Move Block . . . . . . . . . . . . . . . . . . . .    8
  83.                     Shadow Block . . . . . . . . . . . . . . . . . . .    8
  84.                     Transfer Block . . . . . . . . . . . . . . . . . .    8
  85.                     Draw Box . . . . . . . . . . . . . . . . . . . . .    8
  86.                     Draw Line  . . . . . . . . . . . . . . . . . . . .    9
  87.                     Draw Box Line  . . . . . . . . . . . . . . . . . .    9
  88.                Source Menu . . . . . . . . . . . . . . . . . . . . . .    9
  89.                     Define Color Variables . . . . . . . . . . . . . .    9
  90.                     Generate Screen  . . . . . . . . . . . . . . . . .   10
  91.                     Generating Source Files  . . . . . . . . . . . . .   11
  92.  
  93.  
  94.  
  95.                                       Page -2-
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.                          SSG Version 2.0 - Reference Manual
  103.  
  104.  
  105.  
  106.                                   TABLE OF CONTENTS
  107.  
  108.                Video Menu  . . . . . . . . . . . . . . . . . . . . . .   17
  109.                     Select Color . . . . . . . . . . . . . . . . . . .   17
  110.                     Pick Screen Color  . . . . . . . . . . . . . . . .   17
  111.                     Modify Block Color . . . . . . . . . . . . . . . .   18
  112.                     Block to Default Color . . . . . . . . . . . . . .   18
  113.                     Switch Screen  . . . . . . . . . . . . . . . . . .   18
  114.                     View . . . . . . . . . . . . . . . . . . . . . . .   18
  115.                     Change Video Mode  . . . . . . . . . . . . . . . .   18
  116.  
  117.           STEP BY STEP EXAMPLE . . . . . . . . . . . . . . . . . . . .   18
  118.                Example #1 - Menu . . . . . . . . . . . . . . . . . . .   19
  119.                Example #2 - MenuSystem . . . . . . . . . . . . . . . .   21
  120.                Example #3 - Fields2  . . . . . . . . . . . . . . . . .   24
  121.  
  122.           LICENSE  . . . . . . . . . . . . . . . . . . . . . . . . . .   28
  123.  
  124.           DISCLAIMER . . . . . . . . . . . . . . . . . . . . . . . . .   28
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.                                       Page -3-
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.                          SSG Version 2.0 - Reference Manual
  163.  
  164.  
  165.           OVERVIEW
  166.  
  167.           SSG (SCL1 Screen Generator) is a full-screen, extended ASCII    
  168.           editor that will help you design your programs screens.  SSG can
  169.           also generate the data, structures and code from the information
  170.           of your screens for use in programs written using the SCL1
  171.           Library functions. SSG has color and mouse support and can save
  172.           and load your program's screen files with full color information.
  173.           Video modes such as 80 x 25 and 40 x 25 as well as EGA 80 x 43
  174.           and VGA 80 x 50 modes are supported.  You will have full control
  175.           of the generated source by indicating SSG exactly how you want
  176.           the code written.
  177.  
  178.           This document will guide you through the creation of screens and
  179.           the generation of source code from the screens.  SSG is easy to
  180.           use but, in order to get the most out of it, you must learn how
  181.           to make use of all its features.  The time you spend learning SSG
  182.           will save you a lot of programming time.
  183.  
  184.           HARDWARE REQUIREMENTS
  185.  
  186.           SSG will run in most MS/PC DOS computers. The program requires at
  187.           least 320k of free memory and DOS 2.0 and above.  No graphics
  188.           display adapter is required as SSG works in the text mode. A
  189.           mouse is recommended to get the most out of SSG.
  190.  
  191.           INSTALLING SSG
  192.  
  193.           There is no need to perform a special installation of SSG.  The
  194.           program is contained in one file.  SSG will write a configuration
  195.           file containing the default parameters and color information. 
  196.           The only installation required is to copy the SSG.EXE file to the
  197.           working directory or disk.
  198.  
  199.           STARTING SSG
  200.  
  201.           To start SSG, type SSG (specify program file drive and path if
  202.           necessary) and press ENTER.  Once you see SSG's welcome screen,
  203.           press any key or press the mouse's left button to begin.  The
  204.           screen will clear and the STATUS BOX will appear in the screen
  205.           lower left corner.
  206.  
  207.  
  208.           THE STATUS BOX
  209.  
  210.           The STATUS BOX is your interface with the program, it will give
  211.           you very important information and will let you select the
  212.           various options available. The STATUS BOX will look something
  213.           like this:
  214.  
  215.                                       Page -1-
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.                          SSG Version 2.0 - Reference Manual
  223.  
  224.  
  225.  
  226.                     +-------------|STATUS BOX|-------------+
  227.           1st Line  |  Main  Edit  Source  Video  F1 Help  | <-- Menu
  228.           2nd Line  | CURSOR 0  0 ->   MOUSE 0  0    +---+ |
  229.           3rd Line  |   ABCDEFGHIJKLMNOPQRSTUVWXYZ   |   | | <-- Current
  230.           4th Line  | ^                              +---+ |     Character
  231.                     |                                +---+ |
  232.           5th Line  |   abcdefghijklmnopqrstuvwxyz   |   | | <-- Block
  233.           6th Line  |                                +---+ |     Icon
  234.                     +--------------------------------------+
  235.  
  236.                Moving the STATUS BOX:
  237.  
  238.                     The STATUS BOX can be moved to any place in the screen
  239.                     by pressing ALT+U, D, R or L (for up, down, right and
  240.                     left).  You can also move it by pressing (and keeping
  241.                     pressed) the mouse's left button after pointing to the
  242.                     STATUS BOX title at the top of the box and dragging the
  243.                     mouse.
  244.  
  245.                Turning STATUS BOX on and off:
  246.  
  247.                     The STATUS BOX can be turned on or off by pressing the
  248.                     F9 key or by clicking the mouse's right button.
  249.  
  250.           STATUS BOX First Line:
  251.  
  252.                The STATUS BOX's first line contain the available menus.
  253.                Four menus are included; Main, Edit Source and Video.  You
  254.                can also ask for help with the help option.
  255.  
  256.           STATUS BOX Second Line:
  257.  
  258.                The STATUS BOX's second line contains the following:
  259.  
  260.                CURSOR - Displays the current text cursor position. The
  261.                screen's right top corner coordinates are 0,0.
  262.  
  263.                CURSOR DIRECTION - The arrow between the text cursor status
  264.                marker and the mouse cursor status marker shows the
  265.                direction the cursor will move after writing a character.
  266.  
  267.                MOUSE - Displays the mouse cursor position.
  268.                CURRENT CHARACTER BOX - Shows the selected character.
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.                                       Page -2-
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.                          SSG Version 2.0 - Reference Manual
  283.  
  284.  
  285.           STATUS BOX third, fourth fifth and sixth Lines:
  286.  
  287.                The third row and fifth lines show the keyboard layout, this
  288.                lines are static.  Below each keyboard character the
  289.                corresponding character that will be drawn is shown.  This
  290.                translation table shows which symbol is assigned to which
  291.                keyboard key.  For example, in the startup translation
  292.                table, if you press "A" a vertical line will appear at the
  293.                cursor position.  After typing a character the cursor will
  294.                move up, down, left or right depending on how you have set
  295.                the current cursor direction option.  You have four keyboard
  296.                translation tables available.  To toggle among them use the
  297.                F4 key or click the mouse after pointing to the double arrow
  298.                icon (fourth row at the left).
  299.  
  300.                BLOCK ICON - The block icon at the right of the fifth line
  301.                is for selecting a block with the mouse.
  302.  
  303.           USING SSG
  304.  
  305.           Now that you are familiar with the STATUS BOX, let us explore
  306.           SSG's basic editing operations.
  307.  
  308.                Writing a character or symbol:
  309.  
  310.                     To write a character or symbol at the current cursor
  311.                     position, press the key that corresponds to the desired
  312.                     symbol or character.  The symbol or character written
  313.                     to the screen will depend on the current keyboard
  314.                     translation table.  The cursor will advance one
  315.                     character position to the direction indicated by the
  316.                     cursor increment icon in the STATUS BOX. If you have a
  317.                     mouse you can "pick" a desired character or symbol from
  318.                     the STATUS BOX and write it to the screen location
  319.                     where the mouse is clicked.  The symbol you have
  320.                     selected will appear in the current character box at
  321.                     the right of the STATUS BOX's third line. This will
  322.                     remind you of what is the selected a symbol.  To
  323.                     "un-select" the character, click the mouse's left
  324.                     button at current character box.  If you do not have a
  325.                     mouse, you can "pick" a character or symbol by placing
  326.                     the text cursor over the character and pressing
  327.                     SHIFT+F4.
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.                                       Page -3-
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.                          SSG Version 2.0 - Reference Manual
  343.  
  344.  
  345.                Moving the cursor:
  346.  
  347.                     The cursor can be moved by using the arrow keys. The
  348.                     Home, End, PgUp and PgDn keys move the cursor
  349.                     diagonally. The F5, F6, F7, F8 and TAB keys move the
  350.                     cursor several spaces at a time.  You can place the
  351.                     text cursor to the current mouse cursor position by
  352.                     pressing the right mouse button while holding the left
  353.                     button pressed.
  354.  
  355.                Changing the cursor movement direction:
  356.  
  357.                     After writing a character the cursor will move in the
  358.                     direction indicated by the cursor movement icon (an
  359.                     arrow next to the text cursor position display).  You
  360.                     can change the default right direction by pressing F3
  361.                     or by clicking the left button at this icon.
  362.  
  363.                Block operations:
  364.  
  365.                     SSG's most powerful editing operations are performed
  366.                     using marked blocks.  Once a block is marked you can
  367.                     move, edit, color, etc. the information inside the
  368.                     block.
  369.  
  370.                     Marking Blocks:
  371.  
  372.                          With the keyboard:
  373.  
  374.                          Press F10 (Mark Block). The cursor size changes to
  375.                          a block and the STATUS BOX will disappear.  Move
  376.                          the cursor to one of the block corners.  Press
  377.                          ENTER, the cursor will stop blinking.  Now use the
  378.                          cursor movement keys to enlarge the highlighted
  379.                          area to the desired size.  Press ENTER and the
  380.                          block is marked.  A block remains marked until you
  381.                          mark a new block.
  382.  
  383.                          With the mouse:
  384.  
  385.                          Click the mouse left button after pointing to the
  386.                          Block Icon.  The STATUS BOX will disappear from
  387.                          the screen.  Move the mouse cursor to one of the
  388.                          block corners.  Press the mouse's left button and,
  389.                          without releasing it, drag the mouse to the
  390.                          block's opposite corner.  Release the mouse button
  391.                          and the block is marked.
  392.  
  393.  
  394.  
  395.                                       Page -4-
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.                          SSG Version 2.0 - Reference Manual
  403.  
  404.  
  405.           SSG MENUS
  406.  
  407.           Main Menu
  408.  
  409.           To select the Main Menu press the ALT+M keyboard combination or
  410.           click your mouse after pointing to the Main keyword in the STATUS
  411.           BOX.  When you select this option the following menu will pop in
  412.           a window:
  413.  
  414.                 +-----|Main|-----+
  415.                 |  Load          |
  416.                 |  Save          |
  417.                 |  New           |
  418.                 |                |
  419.                 |  Save SSG 1.0  |
  420.                 |                |
  421.                 |  Options       |
  422.                 |                |
  423.                 |  Quit          |
  424.                 +----------------+
  425.  
  426.                The available options are:
  427.  
  428.                Load
  429.  
  430.                Permits you to load screens saved in SSG compatible file
  431.                format.  A file box will appear showing all files that match
  432.                the search string, sorted by name and extension.
  433.                Subdirectories will be preceded by "<". If you select a
  434.                subdirectory, it will be added to the search string. You can
  435.                edit the search string at any time. The search string
  436.                initially is "*.SSG" (or the default extension you have set
  437.                with "Options").
  438.  
  439.                To load a file you first highlight its filename using the
  440.                arrow keys or your mouse and the press ENTER or click your
  441.                mouse after pointing to the "LOAD" button. You can also
  442.                select a file by double clicking your mouse after pointing
  443.                to the desired name.  You can cancel the operation by
  444.                pressing the ESC key or clicking the mouse after pointing to
  445.                the CANCEL button.
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.                                       Page -5-
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.                          SSG Version 2.0 - Reference Manual
  463.  
  464.  
  465.                Save
  466.  
  467.                SSG can save your screen files with all its color
  468.                information.  Enter the file name and path. SSG will warn
  469.                you if a file already exists with the same name. If you had
  470.                set the "Create Backup" option (see "Options" in this menu),
  471.                SSG renames the old copy with the .BAK extension. If you
  472.                don't specify an extension SSG adds the default extension
  473.                specified with "Default Extension" (see "Options"). If you
  474.                want your file without extension add a period to the end of
  475.                its name.
  476.  
  477.                New
  478.  
  479.                Erase the buffer contents and start a new screen.  All the
  480.                screen information will be lost unless you save it to disk.
  481.  
  482.                Save SSG 1.0
  483.  
  484.                This version of SSG uses a different file format than
  485.                previous versions.  The SSG files now contains a header with
  486.                the screen mode information and the files are compressed. 
  487.                SSG will recognize the screen files created by previous
  488.                versions of SSG.  Use this option if you want to save the
  489.                files in the older format.  File compression can reduce the
  490.                file size from 5 to 20%.
  491.  
  492.                Options
  493.  
  494.                This option will permit you to set the default file
  495.                Load/Save options.  You will be able to specify the default
  496.                extension for SSG files and wether you want or not to make
  497.                backup of files.
  498.  
  499.                Quit
  500.  
  501.                Use this option to quit SSG. If the screen contents or the
  502.                generated source code have not been saved you will be
  503.                prompted if you want to do so before exiting.
  504.  
  505.  
  506.           Edit Menu
  507.  
  508.           To select the Edit Menu press the ALT+E keyboard combination or
  509.           click your mouse after pointing to the Edit keyword in the STATUS
  510.           BOX.  When you select this option the following menu will pop in
  511.           a window:
  512.  
  513.  
  514.  
  515.                                       Page -6-
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.                          SSG Version 2.0 - Reference Manual
  523.  
  524.  
  525.                +-------|Edit|------+
  526.                |  Center Block     |
  527.                |  Copy Block       |
  528.                |  Delete Block     |
  529.                |  Fill Block       |
  530.                |  Move Block       |
  531.                |  Shadow Block     |
  532.                |  Transfer Block   |
  533.                |                   |
  534.                |  Draw Box         |
  535.                |  Draw Line        |
  536.                |  Draw Box Line    |
  537.                +-------------------+
  538.  
  539.                Center Block
  540.  
  541.                This option is used to center the marked block.  When you
  542.                select this option a window will pop into the screen
  543.                prompting you how to center the block.  The options are
  544.                Horizontal, Vertical or Both.  After making a selection the
  545.                marked block will be highlighted, press ENTER or the mouse's
  546.                left button to center it, you can cancel the operation by
  547.                pressing ESC or the mouse's right button.
  548.  
  549.                Copy Block
  550.  
  551.                You can make copies of a block and place the copy anywhere
  552.                in the screen.  To perform this operation select "Copy
  553.                Block" from the menu.  Move the copied block to the desired
  554.                position using the cursor movement keys and press ENTER. 
  555.                With the mouse, press the mouse's left button and drag the
  556.                block to it's new position.
  557.  
  558.                Delete Block
  559.  
  560.                This option will delete all the information included in the
  561.                marked block, clearing the area. You can also use this
  562.                option to change the color of the marked area. To change the
  563.                area color, select the color you want using the "Select
  564.                Color" option of the Video Menu and then delete the block. 
  565.                As with most block operations the marked block will be
  566.                highlighted. Press ENTER or the mouse's left button to
  567.                delete the block or press ESC or the mouse's right button to
  568.                cancel. The block will be painted with the selected color
  569.                (all the information inside the block will be erased).
  570.  
  571.  
  572.  
  573.  
  574.  
  575.                                       Page -7-
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.                          SSG Version 2.0 - Reference Manual
  583.  
  584.  
  585.                Fill Block
  586.  
  587.                This option will let you fill the block with a selected
  588.                character.  You must first select the character to be used
  589.                for filling the block.  To select a character you can "pick"
  590.                it form the STATUS BOX with your mouse or pressing the
  591.                SHIFT+F4 key combination after placing the text cursor over
  592.                the desired character.  Then select the "Fill Block" option,
  593.                the STATUS BOX will disappear. If you press ENTER of the
  594.                left mouse button the block will be filled, if you press ESC
  595.                or the right mouse button the operation will be canceled.
  596.  
  597.                Move Block
  598.  
  599.                You can move a block anywhere in the screen. To perform this
  600.                operation select "Move Block" from the menu. Move the block
  601.                to the desired position using the cursor movement keys and
  602.                press ENTER.  With the mouse, press the mouse's left button
  603.                and drag the block to it's new position. Block movement does
  604.                not destroy the background.
  605.  
  606.                Shadow Block
  607.  
  608.                This option lets you add a shadow effect to the current
  609.                block.  When you select this option a window will pop with
  610.                the different shadow options available.  You can add a Solid
  611.                Shadow, XORed shadow with current color XORed or an XORed
  612.                shadow with the default color.
  613.  
  614.                Transfer Block
  615.  
  616.                This option lets you transfer a block form the current
  617.                screen to the alternate screen.  The alternate screen is
  618.                selected form the Video Menu.  To transfer a block, switch
  619.                screens and then select the Transfer Block option.  The
  620.                block will be copied to the alternate screen.
  621.  
  622.                Draw Box
  623.  
  624.                This option lets you draw a box around the marked block.  A
  625.                window will pop into the screen showing the different kinds
  626.                of frames available.  Select one by moving the little arrow
  627.                above the boxes using the arrow keys or by clicking the
  628.                mouse at the desired type of box. The Box will appear. To
  629.                accept it press ENTER or click the mouse's left button. If
  630.                you press ESC or click the mouse's right button the box will
  631.                disappear.
  632.  
  633.  
  634.  
  635.                                       Page -8-
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.                          SSG Version 2.0 - Reference Manual
  643.  
  644.  
  645.                Draw Line
  646.  
  647.                This option will permit you to draw a single line (or the
  648.                character or symbol selected).  Mark the block area with one
  649.                column position (for vertical lines) or one row position
  650.                (for horizontal lines).
  651.  
  652.                Draw Box Line
  653.  
  654.                This option will permit you to draw lines inside boxes. 
  655.                Mark the area where the line is to be drawn.  The line will
  656.                be drawn with the correct line termination characters.
  657.  
  658.           Source Menu
  659.  
  660.           To select the Source Menu press the ALT+S keyboard combination or
  661.           click your mouse after pointing to the Source keyword in the
  662.           STATUS BOX.  When you select this option the following menu will
  663.           pop in a window:
  664.  
  665.                 +---------|Source|---------+
  666.                 |  Define Color Variables  |
  667.                 |                          |
  668.                 |  Generate Screen         |
  669.                 +--------------------------+
  670.  
  671.                Define Color Variables
  672.  
  673.                This option will permit you to set the color variables to be
  674.                used with the generated program. The following window will
  675.                pop into the screen:
  676.                      +-----------------------------+
  677.                      |  Defined color variables:   |
  678.                      |                             |
  679.                      |  Color3                     |
  680.                      |  Color4                     |
  681.                      |  HColor                     |
  682.                      |  NColor                     |
  683.                      |  RColor                     |
  684.                      |                             |
  685.                      |                             |
  686.                      |                             |
  687.                      |                             |
  688.                      |                             |
  689.                      +-----------------------------+
  690.                      |     = ADD =      = EDIT =   |
  691.                      |                             |
  692.                      |    = DELETE =    = OK =     |
  693.                      +-----------------------------+
  694.  
  695.                                       Page -9-
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.                          SSG Version 2.0 - Reference Manual
  703.  
  704.  
  705.                The window will contain a list of the defined color
  706.                variables.  You can add, edit or delete color variables to
  707.                the list.  When you select the ADD option, you will be
  708.                prompted for a variable name.  After typing the variable
  709.                name a Color Selection Menu will appear in the screen.  Use
  710.                your keyboard or the mouse to select the desired color.  The
  711.                new variable will be added to the list. With the EDIT
  712.                option, you can change a selected color variable.  You will
  713.                be prompted for a variable name and the color selection
  714.                process is as for the ADD option.  The DELETE option will
  715.                delete the selected variable from the list.  The OK option
  716.                will remove the window form the screen and will save the
  717.                color variables.
  718.  
  719.                When SSG generates source code it can write the actual color
  720.                values or use predefined variables (see GENERATE SOURCE).
  721.                The following default variables have been defined: NColor
  722.                (white characters on a black background), RColor (black
  723.                characters on a white background) and HColor (highlighted
  724.                white characters on a black background). These variables
  725.                names will be used by SSG when generating the source code.
  726.                In case you have a used a color that has not been defined
  727.                SSG will write "unknown_?" (the "?" being the actual color
  728.                value) to your source code.
  729.  
  730.                Generate Screen
  731.  
  732.                This option is used for beginning the program generation
  733.                process.  The following window will appear in the screen:
  734.  
  735.                     +-------------------------------+
  736.                     |  Generate coordinates using:  |
  737.                     |                               |
  738.                     |   (X) Actual coordinates      |
  739.                     |   ( ) #define                 |
  740.                     +-------------------------------+
  741.                     |  Generate colors using:       |
  742.                     |                               |
  743.                     |   (X) Predefined variables    |
  744.                     |   ( ) Actual values           |
  745.                     +-------------------------------+
  746.                     |                               |
  747.                     |   ( ) Add headers files       |
  748.                     |   ( ) Add Color variables     |
  749.                     |                               |
  750.                     |      = OK =    = CANCEL =     |
  751.                     +-------------------------------+
  752.  
  753.  
  754.  
  755.                                       Page -10-
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.                          SSG Version 2.0 - Reference Manual
  763.  
  764.  
  765.                This window contains the general information about the way
  766.                the source code will be generated.  The default options are
  767.                marked with a check mark.  To toggle an option on or off
  768.                press the SPACEBAR or click the left mouse button after
  769.                placing the mouse cursor over the desired option. With the
  770.                keyboard, use TAB or SHIFT+TAB to move between options. When
  771.                you have made your selections move the cursor to the OK
  772.                button and press ENTER (or click the left mouse button). The
  773.                options are:
  774.  
  775.                     Generate coordinates using:
  776.  
  777.                     You can generate the source file using actual screen
  778.                     position coordinates or relative coordinates.  By
  779.                     selecting the #define option, SSG will write a define
  780.                     statement with the relative position information.  You
  781.                     can later modify this define to change the position of
  782.                     your objects.
  783.  
  784.                     Generate colors using:
  785.  
  786.                     This option lets you select how the color values will
  787.                     be written to your source files.  By selecting the
  788.                     Predefined variables option the instructions will be
  789.                     written using the previously defined color variables. 
  790.                     By selecting the Actual values option the instructions
  791.                     will ne written using the actual color values used when
  792.                     building the screen (see "Define Color Variables").
  793.  
  794.                     Add headers files
  795.  
  796.                     When this option is tagged your source file will
  797.                     contain the SCL1 #include headers.
  798.  
  799.                     Add Color variables
  800.  
  801.                     When this option is tagged the previously defined color
  802.                     variables will be written to your source file.
  803.  
  804.                Generating Source Files
  805.  
  806.                Once you have specified the Source-Generation options the
  807.                Source Generation Menu will be presented in the lower left
  808.                corner of your screen. It has four options:
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.                                       Page -11-
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.                          SSG Version 2.0 - Reference Manual
  823.  
  824.  
  825.                     Add object
  826.  
  827.                     Select this option to define an object in your screen.
  828.                     An object can be a window, a menu, a string, a field,
  829.                     etc.  SSG will present a list of supported objects from
  830.                     which you can select the desired one.
  831.  
  832.                     Done
  833.  
  834.                     Select this option when no more objects need to be
  835.                     defined.
  836.  
  837.                     Redo
  838.  
  839.                     Discard the last defined object.
  840.  
  841.                     View 
  842.  
  843.                     Select this option to view the source code being
  844.                     generated by SSG.
  845.  
  846.                When you select the "Add Object" option, an object list
  847.                appears in the center of the screen.  The list contains the
  848.                different functions the SSG can program for you.  The source
  849.                code will be written exactly as you instruct SSG. You have
  850.                to be careful to select the desired function in the correct
  851.                order.
  852.  
  853.                When you select an object from this list, SSG will prompt
  854.                you for the necessary information, such as; marking the
  855.                affected area, indicating the colors, etc.
  856.  
  857.                SSG will write the source code using the SCL1 functions. The
  858.                available objects refer to these functions.  Refer to the
  859.                SCL1 reference manual for a detailed description of each
  860.                supported function.
  861.  
  862.                The available objects are:
  863.  
  864.                     BigCursor - Will write the source code for changing the
  865.                     cursor size to a block.
  866.  
  867.                     Box - Will write the source code for drawing a box, SSG
  868.                     will read from the screen the frame type and box
  869.                     position. You will be prompted to mark the box area. 
  870.                     Various options are available:
  871.  
  872.                          Box - plain box.
  873.  
  874.  
  875.                                       Page -12-
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.                          SSG Version 2.0 - Reference Manual
  883.  
  884.  
  885.                          Box (Grow) - box that will grow.
  886.  
  887.                          Box (Shadow) - box with shadow effect.
  888.  
  889.                          Box (Sound) - box drawn with sound effect.
  890.  
  891.                          Box (Grow+Shadow) - growing box with shadow
  892.                          effects.
  893.  
  894.                          Box (Grow+Sound) - growing box with sound effects.
  895.  
  896.                          Box (Grow+Shadow+Sound) - growing box with both
  897.                          shadow and sound effects.
  898.  
  899.                     Box Line - Will write the data and call to the
  900.                     DrawBoxLine function according to the marked area. 
  901.                     This will draw a line with correct termination
  902.                     characters inside a Box. SSG will read the
  903.                     corresponding line type from the screen.
  904.  
  905.                     Calendar - Will write the source code for the structure
  906.                     and a call to the calendar function with the C_RESET,
  907.                     C_DRAW and C_BROWSE messages.
  908.  
  909.                     Calendar (structure) - Will write only the Calendar
  910.                     structure according to the position and color
  911.                     information selected.
  912.  
  913.                     Clear Area - Will write a Cls function to clear a
  914.                     screen area.  SSG will determine the area coordinates
  915.                     from the area you mark when prompted.
  916.  
  917.                     CursorOff - Will write a CursorOff function call to the
  918.                     source code.
  919.  
  920.                     CursorOn - Will write a CursorOn function call to the
  921.                     source code.
  922.  
  923.                     DrawLine - Will write the data and call to the DrawLine
  924.                     function according to the marked area.
  925.  
  926.                     Fields - Will write to the source file, the required
  927.                     structure and function call to make a data entry screen
  928.                     using the Fields function.  SSG will prompt you to mark
  929.                     each field prompt and input area. If you want to
  930.                     include a validation or help function you must add the
  931.                     function's name to the finished source code.
  932.  
  933.  
  934.  
  935.                                       Page -13-
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.                          SSG Version 2.0 - Reference Manual
  943.  
  944.  
  945.                     Fields2 - Will write to the source file, the required
  946.                     structure and function call to make a data entry screen
  947.                     using the Fields2 function.  SSG will prompt you to
  948.                     indicate each field type, then it will prompt for the
  949.                     field information in a pop-up window.  If you want to
  950.                     include a validation or help function you must add the
  951.                     function's name to the finished source code.
  952.  
  953.                     FillBlock - Will write the source code for a call to
  954.                     the FillBlock function.  The fill character, position
  955.                     coordinates and colors will be read from the screen.
  956.  
  957.                     Function Name -  Will prompt you for the function name
  958.                     and will insert it in the source code with an opening
  959.                     brace.  For example, to begin a program you can type in
  960.                     the "main" name when prompted.
  961.  
  962.                     Function Close - Will add the closing brace to the
  963.                     source code.
  964.  
  965.                     Get String - Will write to the source file a function
  966.                     call for getting a string from the console using the
  967.                     GetString function.
  968.  
  969.                     HideMouse - Will write a HideMouse function call to the
  970.                     source code.
  971.  
  972.                     InitMouse - Will write a InitMouse function call to the
  973.                     source code.
  974.  
  975.                     LineEditor - Will write to the source file the
  976.                     structures and a call to the LineEditor function.  You
  977.                     will be prompted to mark the prompt and field areas and
  978.                     the field options.
  979.  
  980.                     LineEditor (structure) - Will create a LineEditor
  981.                     structure according to the information supplied.
  982.  
  983.                     ListWindow - Will write to the source file the data and
  984.                     a call to the ListWindow function.  You will be
  985.                     prompted to mark the display area.
  986.  
  987.                     ListWindow (structure) - Will create a ListWindow
  988.                     structure according to the information supplied.
  989.  
  990.                     Menu - Will write to the source file a call to the Menu
  991.                     function. You will be prompted to mark each of the menu
  992.                     selection items, to indicate the menu structure name
  993.                     and the normal, reverse and highlight colors.
  994.  
  995.                                       Page -14-
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.                          SSG Version 2.0 - Reference Manual
  1003.  
  1004.  
  1005.                     MenuSystem - Will write to the source file the
  1006.                     structures and a call to the MenuSystem function.  You
  1007.                     will be asked if you want a shadow effect on the pull-
  1008.                     down menus, if you will access them with an ALT+key
  1009.                     keyboard input and if you want to draw lines in empty
  1010.                     spaces.  You will then be prompted to mark the top-bar
  1011.                     menu area and each option.  To permit good mouse
  1012.                     interface mark each option with one space before and
  1013.                     after each option's text and do not leave spaces
  1014.                     between them.  You will be asked to press the keyboard
  1015.                     combination that will pull-down the  menu for that
  1016.                     option.  Then you are required to mark each pull down
  1017.                     menu area and menu options.
  1018.  
  1019.                     MenuSystem (structure) - Will create a MenuSystem
  1020.                     structure according to the supplied information.
  1021.  
  1022.                     MouseMenu -  Will write to the source file a structure
  1023.                     and a call to the MouseMenu function. You will be
  1024.                     prompted to mark each of the menu selection items, to
  1025.                     indicate the menu structure name and the reversed
  1026.                     color.
  1027.  
  1028.                     MouseButton - Will write to the source file a call to
  1029.                     the MouseButton function.
  1030.  
  1031.                     MouseButton (structure) - Will create a MouseButton
  1032.                     structure according to the supplied information.
  1033.  
  1034.                     ScreenDump - Will write to the source file a set of
  1035.                     character/attribute codes for each of the screen
  1036.                     positions enclosed in the marked area. With this call
  1037.                     you can write the code to duplicate a complex screen.
  1038.  
  1039.                     ScrollWindow - Will write to the source file a call to
  1040.                     the ScrollWindow function.  You will be prompted to
  1041.                     mark the display area.
  1042.  
  1043.                     ScrollWindow (structure) - Will create a ScrollWindow
  1044.                     structure according to the information supplied.
  1045.  
  1046.                     Shadow (solid color) - Will add a function call to draw
  1047.                     a solid color shadow effect to the marked area.
  1048.  
  1049.                     Shadow (XOR'ed) - Will add a function call to draw an
  1050.                     XOR'ed shadow effect to the marked area.
  1051.  
  1052.                     ShowMouse - Will write the source code for displaying
  1053.                     the mouse.
  1054.  
  1055.                                       Page -15-
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.                          SSG Version 2.0 - Reference Manual
  1063.  
  1064.  
  1065.                     Select - Will write to the source file a call to the
  1066.                     Select function.
  1067.  
  1068.                     Select (structure) - Will create a Select structure
  1069.                     according to the supplied information.
  1070.  
  1071.                     SetVideoMode - Will write a SetVideoMode function call
  1072.                     to the source code.
  1073.  
  1074.                     Set EGA/VGA 25 - Will write the source code for
  1075.                     changing the video mode to 25 lines display.
  1076.  
  1077.                     Set EGA/VGA 43/50 - Will write the source code for
  1078.                     changing the video mode to 43/50 lines display.
  1079.  
  1080.                     TagItem - Will write to the source file a call to the
  1081.                     TagItem function.
  1082.  
  1083.                     TagItem (structure) - Will create a TagItem structure
  1084.                     according to the supplied information.
  1085.  
  1086.                     Window (open+clear area) - Will add a function call to
  1087.                     open a window and clear the screen area. You will be
  1088.                     prompted for the window buffer name. The window buffer
  1089.                     size is computed by SSG (The maximum number of windows
  1090.                     that SSG can open is 20).
  1091.  
  1092.                     Window (open only) - Will add a function call to open a
  1093.                     window. You will be prompted for the window buffer
  1094.                     name. The window buffer size is computed by SSG (The
  1095.                     maximum number of windows that SSG can open is 20).
  1096.  
  1097.                     Window(Close) - Will close a previously opened window
  1098.                     and will restore the previous screen contents.
  1099.  
  1100.                     WriteChar(s) - Will add a function call to the
  1101.                     WriteChar function. The code written will select the
  1102.                     character at the cursor position.
  1103.  
  1104.                     WriteScreen - Will write the source code to write a
  1105.                     string to the screen.
  1106.  
  1107.                When you have finished generating your source code you can
  1108.                exit the "Source Generating Menu" by selecting the "Done"
  1109.                option.  If SSG has generated at least one line of source
  1110.                code, the "Save File", "View Source" and "New" options will
  1111.                be added to the SOURCE MENU.  This menu will now look like
  1112.                this:
  1113.  
  1114.  
  1115.                                       Page -16-
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.                          SSG Version 2.0 - Reference Manual
  1123.  
  1124.  
  1125.                     +---------|Source|---------+
  1126.                     |  Define Color Variables  |
  1127.                     |                          |
  1128.                     |  Generate Screen         |
  1129.                     |                          |
  1130.                     |  Save File               |
  1131.                     |                          |
  1132.                     |  View Source             |
  1133.                     |                          |
  1134.                     |  New                     |
  1135.                     +--------------------------+
  1136.  
  1137.                The new options added are self explanatory.
  1138.  
  1139.           Video Menu
  1140.  
  1141.           To select the Video Menu press the ALT+V keyboard combination or
  1142.           click your mouse after pointing to the Video keyword in the
  1143.           STATUS BOX.  Everything related to video modes, colors, etc. is
  1144.           found in this menu.
  1145.  
  1146.                     +---------|Video|----------+
  1147.                     |  Select Color            |
  1148.                     |  Pick Screen Color       |
  1149.                     |  Modify Block Color      |
  1150.                     |  Block to Default Color  |
  1151.                     |                          |
  1152.                     |  Switch Screen           |
  1153.                     |  View                    |
  1154.                     |                          |
  1155.                     |  40 columns x 25 lines   |
  1156.                     |  80 columns x 25 lines   |
  1157.                     |  80 columns x 50 lines   |
  1158.                     +--------------------------+
  1159.  
  1160.                Select Color
  1161.  
  1162.                When you select this option a "Color Selection Table" will
  1163.                appear in the screen.  Use your keyboard or the mouse to
  1164.                select the desired color.
  1165.  
  1166.                Pick Screen Color
  1167.  
  1168.                This option lets you "pick" or select the default color from
  1169.                the screen by clicking the mouse or pressing ENTER after
  1170.                moving the cursor over the desired color.
  1171.  
  1172.  
  1173.  
  1174.  
  1175.                                       Page -17-
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.                          SSG Version 2.0 - Reference Manual
  1183.  
  1184.  
  1185.                Modify Block Color
  1186.  
  1187.                When you select "Modify Block Color" option a window will
  1188.                appear.  As with most block operations the marked block will
  1189.                be highlighted,  use the Up and Down arrow keys to change
  1190.                the foreground color.  By pressing TAB you can toggle
  1191.                between foreground and background. You can toggle as many
  1192.                times as you like between foreground and background. Press
  1193.                the Spacebar to toggle blinking on/off.  Press ENTER to exit
  1194.                with new colors or ESC to restore original colors.
  1195.  
  1196.                Block to Default Color
  1197.  
  1198.                This option will change a marked block's color to the
  1199.                default color.
  1200.  
  1201.                Switch Screen
  1202.  
  1203.                SSG has two working screens. These screens can hold
  1204.                different information.  You can transfer information between
  1205.                screens.  Both screen need no to be configured in the same
  1206.                video mode.  With this option you can switch the active
  1207.                screen.
  1208.  
  1209.                View
  1210.  
  1211.                This option permits you to view the contents of both edit
  1212.                screens. Both the mouse and the text cursors and the STATUS
  1213.                BOX are removed form the screen.
  1214.  
  1215.                Change Video Mode
  1216.  
  1217.                The video modes available in your system will be displayed
  1218.                as, for example: 40 columns x 25 lines, 80 columns x 25
  1219.                lines or 80 columns x 50 lines.  You can pick any of the
  1220.                available video modes with your keyboard or mouse.
  1221.  
  1222.  
  1223.           STEP BY STEP EXAMPLE
  1224.  
  1225.           The best way to learn about is SSG is to actually build a screen
  1226.           and generate a program source. The following instructions will
  1227.           guide you, step by step, through this process.  We will now do
  1228.           three step-by-step examples of programs built with the aid of
  1229.           SSG.
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.                                       Page -18-
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.                          SSG Version 2.0 - Reference Manual
  1243.  
  1244.  
  1245.           Example #1 - Menu
  1246.  
  1247.           -    Start SSG.
  1248.  
  1249.           -    Move the cursor to row 1, column 4.
  1250.  
  1251.           -    Change the character translation table to the text mode (by
  1252.                pressing F4 or clicking your mouse after pointing to the
  1253.                arrow icon). Type "MAIN MENU"
  1254.  
  1255.           -    Move the cursor to row 3, column 2.  Type "First Option". 
  1256.                Move the cursor to row 4, column 2 and type "Second Option. 
  1257.                Continue incrementing the row position, aligning the column
  1258.                position and type "Third Option", "Fourth Option" and "Fifth
  1259.                Option".  Move the cursor to row 9, column 2 and type
  1260.                "Exit".
  1261.  
  1262.           -    Mark a block to surround the Menu, leave space for drawing a
  1263.                box around it.  The block should begin at row 0, column 0
  1264.                and end at row 10, column 16 (or it can be marked from row
  1265.                10, column 16 to row 0, column 0).
  1266.  
  1267.           -    From the "Edit Menu" select the "Draw Box" option.  Select a
  1268.                double line box frame.  Mark a new block starting at row 2,
  1269.                column 0 to column 16.  Select the "DrawBoxLine" option from
  1270.                the "Edit Menu".
  1271.  
  1272.           -    Mark the whole block again and select the "Center Block"
  1273.                option from the "Edit Menu".  Center the block both
  1274.                horizontally and vertically.
  1275.  
  1276.           -    Note the you have three options starting with the letter
  1277.                "F".  We must tell SSG what key will be used as a Hot-Key.
  1278.                Select the "Select Color" option from the "Video Menu" and
  1279.                select black background with highlighted white characters. 
  1280.                Now move the cursor to the "F" in the "First Option" and
  1281.                type "F".  Do the same with the "S" in "Second Option", the
  1282.                "T" in "Third Option", the"o" in "Fourth Option", the "i" in
  1283.                "Fifth Option", and the "E" in "Exit".
  1284.  
  1285.           -    Now we are ready to generate the source code.  Select the
  1286.                "Generate Screen" option from the "Source Menu".  Tag the
  1287.                following options:  Actual coordinates, Predefined
  1288.                variables, Add headers files and Add Color variables.
  1289.  
  1290.           -    You will be prompted to indicate the screen name, type Menu.
  1291.  
  1292.           -    Select the "Add Object" option.  Select the "Function Name"
  1293.                option, when prompted indicate the function name as "main".
  1294.  
  1295.                                       Page -19-
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.                          SSG Version 2.0 - Reference Manual
  1303.  
  1304.  
  1305.           -    Select the "Add Object" option.  Select the "Clear Screen
  1306.                Area" option, when prompted mark a block from row 0, column
  1307.                0 to row 24, column 79 (the whole screen).
  1308.  
  1309.           -    Select the "Add Object" option.  Select the Box (grow)
  1310.                option. Mark the box area when prompted.
  1311.  
  1312.           -    Select the "Add Object" option.  Select the "Box Line"
  1313.                option.  Mark the line area when prompted (the line that
  1314.                separates the "MAIN MENU" text from the rest of the menu.
  1315.  
  1316.           -    Select the "Add Object" option.  Select the "WriteScreen"
  1317.                option.  Mark the text "MAIN MENU".
  1318.  
  1319.           -    Select the "Add Object" option.  Select the "Menu" option.
  1320.                Do not tag any of the display options presented in the Menu
  1321.                Initialization Prompt.  Mark each menu option when prompted. 
  1322.                For a neater look make the length of each selection equal. 
  1323.                When you mark the last menu option ("Exit"), answer the
  1324.                "Reverse Color" prompt and indicate that you do not want
  1325.                more options.
  1326.  
  1327.           -    Select the "Add Object" option.  Select the "Function Close"
  1328.                option.
  1329.  
  1330.           -    You have finished writing the source code for the sample
  1331.                menu.  You can take a look at the source code by selecting
  1332.                the "View" option.  To finish the process select the "Done"
  1333.                option.  Save the source file as "SAMPMENU.C" and exit SSG. 
  1334.                It is recommended that the screen be saved for future
  1335.                practice.
  1336.  
  1337.           The source file you have just created should look like this:
  1338.  
  1339.           #include <scl1.h>
  1340.           #include <scl1keys.h>
  1341.  
  1342.           /***** Menu DATA *****/
  1343.  
  1344.           int NColor=7;
  1345.           int RColor=112;
  1346.           int HColor=15;
  1347.  
  1348.           char Menu_str0[]="MAIN MENU";
  1349.  
  1350.           struct MenuOpt Menu_mo0[]={
  1351.                10,33,"First Option ",'F',
  1352.                11,33,"Second Option",'S',
  1353.                12,33,"Third Option ",'T',
  1354.  
  1355.                                       Page -20-
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.                          SSG Version 2.0 - Reference Manual
  1363.  
  1364.  
  1365.                13,33,"Fourth Option",'o',
  1366.                14,33,"Fifth Option ",'i',
  1367.                16,33,"Exit         ",'E',
  1368.                };
  1369.  
  1370.           /***** Menu CODE *****/
  1371.  
  1372.           main(void)
  1373.           {
  1374.           Cls(NColor,0,0,24,79);
  1375.           GSSBox(NColor,0,7,31,16,47,1,0,0);
  1376.           DrawBoxLine(NColor,0,9,31,9,47);
  1377.           WriteScreen(NColor,8,35,Menu_str0);
  1378.           Cls(NColor,7,31,17,46);
  1379.           Menu(NColor,RColor,NColor,6,Menu_mo0);
  1380.           }
  1381.  
  1382.           Example #2 - MenuSystem
  1383.  
  1384.           The screen you will need to practice how to generate a MenuSystem
  1385.           source code has been included in the screen file "SAMPMSYS.SSG". 
  1386.  
  1387.           -    Load the SAMPMSYS.SSG screen file into SSG.
  1388.  
  1389.           -    Select the "Generate Screen" option from the "Source Menu". 
  1390.                Tag the following options:  Actual coordinates, Predefined
  1391.                variables, Add headers files and Add Color variables.
  1392.  
  1393.           -    You will be prompted to indicate the screen name, type Msys.
  1394.  
  1395.           -    Select the "Add Object" option.  Select the "Function Name"
  1396.                option, when prompted indicate the function name as "main".
  1397.  
  1398.           -    Select the "Add Object" option.  Select the "Clear Screen
  1399.                Area" option, when prompted mark a block from row 1, column
  1400.                0 to row 24, column 79 (the whole screen).
  1401.  
  1402.           -    Select the "Add Object" option.  Select the "MenuSystem"
  1403.                option.
  1404.  
  1405.           -    You will be prompted to mark the bar menu area. Mark the
  1406.                whole top line from column 0 to column 79.
  1407.  
  1408.           -    The Menu System Initialization window will pop into the
  1409.                screen.  Select the "Division Lines" and "ALT Sensitive"
  1410.                options and the "OK" button.
  1411.  
  1412.  
  1413.  
  1414.  
  1415.                                       Page -21-
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.                          SSG Version 2.0 - Reference Manual
  1423.  
  1424.  
  1425.           -    You will be prompted to mark each of the bar menu options. 
  1426.                For a better interface mark start the block one character to
  1427.                the left and finish the block one character to the right of
  1428.                each bar menu option.  Mark the first option "File", you
  1429.                will be prompted to press the ALT+key combination that will
  1430.                call this option, press ALT+F.  A window will pop asking if
  1431.                you want more bar menu options.  Mark the other two bar menu
  1432.                options using the same procedure, this time indicating the
  1433.                ALT+O and ALT+E key combinations (for "Options" and "Exit").
  1434.  
  1435.           -    After finishing defining the bar menu you will be prompted
  1436.                to define each individual pull down menu.  The procedure is
  1437.                identical to that used in the Menu example.
  1438.  
  1439.           -    After completing the Menu System definition select the
  1440.                "Function Close" object to finish the source code generation
  1441.                process.  The generated code will look like this:
  1442.  
  1443.           #include <scl1.h>
  1444.           #include <scl1keys.h>
  1445.  
  1446.           /***** Msys DATA *****/
  1447.  
  1448.           int NColor=7;
  1449.           int RColor=112;
  1450.           int HColor=15;
  1451.           int Mess;
  1452.  
  1453.           MSBar Msys_msb0[]={
  1454.                1,6,0x2100," File ",
  1455.                7,15,0x1800," Options ",
  1456.                16,21,0x1200," Exit ",
  1457.                };
  1458.  
  1459.           MSOptions Msys_mso0[]={
  1460.                2,2,"Open   ",'O',
  1461.                3,2,"Close  ",'C',
  1462.                5,2,"Delete ",'D',
  1463.                6,2,"Copy   ",'o',
  1464.                7,2,"Compare",'m',
  1465.                };
  1466.  
  1467.           MSOptions Msys_mso1[]={
  1468.                2,8,"Toggle Verify   ",'T',
  1469.                3,8,"Select Drive    ",'S',
  1470.                4,8,"Select Directory",'e',
  1471.                6,8,"Backup          ",'B',
  1472.                7,8,"Restore         ",'R',
  1473.                };
  1474.  
  1475.                                       Page -22-
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.                          SSG Version 2.0 - Reference Manual
  1483.  
  1484.  
  1485.           MSOptions Msys_mso2[]={
  1486.                2,17,"Help    ",'H',
  1487.                4,17,"Continue",'C',
  1488.                6,17,"Quit    ",'Q',
  1489.                };
  1490.  
  1491.           char ms0_wbuf[378];
  1492.  
  1493.           MSWindow Msys_msw0[]={
  1494.                1,0,8,10,5,ms0_wbuf,Msys_mso0,
  1495.                1,6,8,25,5,ms0_wbuf,Msys_mso1,
  1496.                1,15,7,26,3,ms0_wbuf,Msys_mso2,
  1497.                };
  1498.  
  1499.           MSData Msys_msd0={112,15,7,112,15,Msys_msb0,Msys_msw0,3,0,0,0};
  1500.  
  1501.           /***** Msys CODE *****/
  1502.  
  1503.           main(void)
  1504.           {
  1505.           Cls(RColor,0,0,24,79);
  1506.           MenuSystem(MS_SHADOW_ON,(MSData *)0);
  1507.           MenuSystem(MS_LINE_ON,(MSData *)0);
  1508.           MenuSystem(MS_ALT_ON,(MSData *)0);
  1509.           MenuSystem(MS_DRAW,&Msys_msd0);
  1510.           do
  1511.                {
  1512.                if(Mess=KeyReady())
  1513.                     {
  1514.                     Mess=MenuSystem(MS_KEY,&Msys_msd0,Mess);
  1515.                     if(KeyReady())
  1516.                          GetKey();
  1517.                     }
  1518.                else
  1519.                     Mess=MenuSystem(MS_CHECK,&Msys_msd0);
  1520.                }while(Mess != MS_SELECT && Mess != MS_CANCEL);
  1521.           }
  1522.  
  1523.           SSG assumed that the exit condition will be the first option of
  1524.           the first pull-down menu. In this example this condition will be
  1525.           the third option of the third menu.  You should edit the last
  1526.           line of our sample source code to read this:
  1527.  
  1528.                }while(Msys_msd0!=3 || Msys_msd0.Option!=3);
  1529.  
  1530.           You can now compile and run the sample Menu System.
  1531.  
  1532.  
  1533.  
  1534.  
  1535.                                       Page -23-
  1536.  
  1537.  
  1538.  
  1539.  
  1540.  
  1541.  
  1542.                          SSG Version 2.0 - Reference Manual
  1543.  
  1544.  
  1545.           Example #3 - Fields2
  1546.  
  1547.           The screen you will need to practice how to generate a Field2
  1548.           source code has been included in the screen file "SAMPFLD2.SSG". 
  1549.  
  1550.           -    Load the SAMPFLD2.SSG screen file into SSG.
  1551.  
  1552.           -    Select the "Generate Screen" option from the "Source Menu". 
  1553.                Tag the following options:  Actual coordinates, Predefined
  1554.                variables, Add headers files and Add Color variables.
  1555.  
  1556.           -    You will be prompted to indicate the screen name, type Fld.
  1557.  
  1558.           -    Select the "Add Object" option.  Select the "Function Name"
  1559.                option, when prompted indicate the function name as "main".
  1560.  
  1561.           -    Select the "Add Object" option.  Select the "Clear Screen
  1562.                Area" option, when prompted mark a block from row 0, column
  1563.                0 to row 24, column 79 (the whole screen).
  1564.  
  1565.           -    Select the "Add Object" option.  Select the "Box" object and
  1566.                mark the box area.  Then, using the "Box Line" object mark
  1567.                the two interior lines inside the box (one horizontal and
  1568.                one one vertical).
  1569.  
  1570.           -    Select the "Add Object" option.  Select the "WriteScreen"
  1571.                object and mark the "STUDENT RECORD" screen title.  Select
  1572.                this object again and mark the "Member of:" prompt.  (the
  1573.                other prompts will be defined when the corresponding fields
  1574.                are defined)
  1575.  
  1576.           -    Select the "Add Object" option.  Select the "Fields2"
  1577.                option.  You will be presented with a list of field types. 
  1578.                Select the "Line Editor" field type, you will be prompted to
  1579.                mark the prompt area, mark the prompt "Name:".  The you will
  1580.                be prompted to mark the data entry area.  After marking the
  1581.                data entry area you will be prompted to tag the Line Editor
  1582.                options, since this field can have any characters and does
  1583.                not need any formatting, keep the default options.
  1584.  
  1585.           -    You will now need to define the other fields.  The
  1586.                "Address:", "City:", "State:" and "Zip:" fields are all of
  1587.                the Line Editor type.  The only difference are the options
  1588.                that we need to specify.  For the "State:" field we can
  1589.                select the "Capitalize" option.
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.                                       Page -24-
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602.                          SSG Version 2.0 - Reference Manual
  1603.  
  1604.  
  1605.           -    The "Sex" field is of the "Select" type. You will be
  1606.                prompted to mark the option strings.  Mark just the text and
  1607.                not the parenthesis.  When prompted if you want a field
  1608.                prompt, answer yes and mark the "Sex:" prompt.
  1609.  
  1610.           -    The next three fields are of the Line Editor type. For the
  1611.                "Student Number" and "Age" fields we can specify "Digits" as
  1612.                the acceptable characters.  For the "Date Admitted" we can
  1613.                specify a "Formatted" type field with the "/" format
  1614.                character.
  1615.  
  1616.           -    The next field is of the "Select" type. Proceed as explained
  1617.                above.
  1618.  
  1619.           -    The "Member of:" field can have any number of options tagged
  1620.                so it is not of the Select type.  We must define each
  1621.                available option as a "TagItem" field type.  In this case we
  1622.                must select the "TagItem" field type six times and mark the
  1623.                field string for each option.
  1624.  
  1625.           -    The "Grade Category:" field is of the "Select" type. 
  1626.                Proceed as explained above.
  1627.  
  1628.           -    The remaining fields are of the "MouseButton" type. After
  1629.                selecting the MouseButton option you will be prompted to
  1630.                mark the area and the text for each option.
  1631.  
  1632.           -    After defining all three MouseButtons instruct SSG that you
  1633.                do not want any more fields.  The select the "Function
  1634.                Close" object.
  1635.  
  1636.           #include <scl1.h>
  1637.           #include <scl1keys.h>
  1638.  
  1639.           /***** Fld DATA *****/
  1640.  
  1641.           int NColor=7;
  1642.           int RColor=112;
  1643.           int HColor=15;
  1644.  
  1645.           char Fld_str0[]="STUDENT RECORD";
  1646.           char Fld_str1[]="Member of:";
  1647.           char Fld_ledbuf0[40];
  1648.           LEData Fld_led0={
  1649.                7,6,4,"Name:",7,6,10,39,39,CC_ANY,0,0,Fld_ledbuf0,0,0,0,
  1650.                2,1,0,0,0,0,0,0,0};
  1651.  
  1652.           char Fld_ledbuf1[37];
  1653.  
  1654.  
  1655.                                       Page -25-
  1656.  
  1657.  
  1658.  
  1659.  
  1660.  
  1661.  
  1662.                          SSG Version 2.0 - Reference Manual
  1663.  
  1664.  
  1665.           LEData Fld_led1={
  1666.                7,8,4,"Address:",7,8,13,36,36,CC_ANY,0,0,Fld_ledbuf1,
  1667.                0,0,0,2,1,0,0,0,0,0,0,0};
  1668.  
  1669.           char Fld_ledbuf2[11];
  1670.           LEData Fld_led2={
  1671.                7,10,4,"City:",7,10,10,10,10,CC_ANY,0,0,Fld_ledbuf2,
  1672.                0,0,0,2,1,0,0,0,0,0,0,0};
  1673.  
  1674.           char Fld_ledbuf3[3];
  1675.           LEData Fld_led3={
  1676.                7,10,22,"State:",7,10,29,2,2,CC_ANY | CC_CAPITALIZE,
  1677.                0,0,Fld_ledbuf3,0,0,0,2,1,0,0,0,0,0,0,0};
  1678.  
  1679.           char Fld_ledbuf4[11];
  1680.           LEData Fld_led4={
  1681.                7,10,34,"Zip:",7,10,39,10,10,CC_ANY,0,0,Fld_ledbuf4,
  1682.                0,0,0,2,1,0,0,0,0,0,0,0};
  1683.  
  1684.           SData1 Fld_sd1_0[]={
  1685.                12,9,"Male",
  1686.                12,19,"Female",
  1687.                0};
  1688.  
  1689.           SData2 Fld_sd2_0={7,12,4,"Sex: 0,0,0,0};
  1690.  
  1691.           char Fld_ledbuf5[8];
  1692.           LEData Fld_led5={
  1693.                7,14,4,"Student Number :",7,14,21,7,7,CC_DIGIT,
  1694.                0,0,Fld_ledbuf5,0,0,0,2,1,0,0,0,0,0,0,0};
  1695.  
  1696.           char Fld_ledbuf6[5];
  1697.           LEData Fld_led6={
  1698.                     7,14,31,"Age:",7,14,36,4,4,CC_DIGIT,0,0,Fld_ledbuf6,
  1699.                0,0,0,2,1,0,0,0,0,0,0,0};
  1700.  
  1701.           char Fld_ledbuf7[9];
  1702.           LEData Fld_led7={
  1703.                7,16,4,"Date Admitted :",7,16,20,8,8,CC_DIGIT,0,
  1704.                0,Fld_ledbuf7,"/",0,0,2,1,0,0,0,0,0,0,0};
  1705.  
  1706.           SData1 Fld_sd1_1[]={
  1707.                18,22,"Full Time",
  1708.                18,36,"Part Time",
  1709.                0};
  1710.  
  1711.           SData2 Fld_sd2_1={7,18,4,"Type of Student: 0,0,0,0};
  1712.           TIData Fld_ti0={7,7,56,0,"Honor Society",0,0};
  1713.           TIData Fld_ti1={7,8,56,0,"Basketball Team",0,0};
  1714.  
  1715.                                       Page -26-
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.                          SSG Version 2.0 - Reference Manual
  1723.  
  1724.  
  1725.           TIData Fld_ti2={7,9,56,0,"Photography Club",0,0};
  1726.           TIData Fld_ti3={7,10,56,0,"Oratory Club",0,0};
  1727.           TIData Fld_ti4={7,11,56,0,"Drama Club",0,0};
  1728.           TIData Fld_ti5={7,12,56,0,"Radio Club",0,0};
  1729.  
  1730.           SData1 Fld_sd1_2[]={
  1731.                15,56,"1.0 to 1.5",
  1732.                16,56,"1.5 to 2.0",
  1733.                17,56,"2.0 to 2.5",
  1734.                18,56,"2.5 to 3.0",
  1735.                19,56,"3.0 to 3.5",
  1736.                20,56,"3.5 to 4.0",
  1737.                0};
  1738.  
  1739.           SData2 Fld_sd2_2={7,14,56,"Grade Category:0,0,0,0};
  1740.           MBData Fld_mb0={7,112,21,5,21,17,21,6,"NEXT RECORD",0,0,0,0};
  1741.           MBData Fld_mb1={7,112,21,21,21,37,21,22,"PREVIOUS
  1742.                          RECORD",0,0,0,0};
  1743.           MBData Fld_mb2={7,112,21,42,21,47,21,43,"QUIT",0,0,0,0};
  1744.  
  1745.           FData1 Fld_fd1_0[]={
  1746.                LINE_EDITOR,&Fld_led0,0,FieldCheck,
  1747.                LINE_EDITOR,&Fld_led1,0,FieldCheck,
  1748.                LINE_EDITOR,&Fld_led2,0,FieldCheck,
  1749.                LINE_EDITOR,&Fld_led3,0,FieldCheck,
  1750.                LINE_EDITOR,&Fld_led4,0,FieldCheck,
  1751.                SELECT,Fld_sd1_0,&Fld_sd2_0,FieldCheck,
  1752.                LINE_EDITOR,&Fld_led5,0,FieldCheck,
  1753.                LINE_EDITOR,&Fld_led6,0,FieldCheck,
  1754.                LINE_EDITOR,&Fld_led7,0,FieldCheck,
  1755.                SELECT,Fld_sd1_1,&Fld_sd2_1,FieldCheck,
  1756.                TAG_ITEM,&Fld_ti0,0,FieldCheck,
  1757.                TAG_ITEM,&Fld_ti1,0,FieldCheck,
  1758.                TAG_ITEM,&Fld_ti2,0,FieldCheck,
  1759.                TAG_ITEM,&Fld_ti3,0,FieldCheck,
  1760.                TAG_ITEM,&Fld_ti4,0,FieldCheck,
  1761.                TAG_ITEM,&Fld_ti5,0,FieldCheck,
  1762.                SELECT,Fld_sd1_2,&Fld_sd2_2,FieldCheck,
  1763.                MOUSE_BUTTON,&Fld_mb0,0,FieldCheck,
  1764.                MOUSE_BUTTON,&Fld_mb1,0,FieldCheck,
  1765.                MOUSE_BUTTON,&Fld_mb2,0,FieldCheck,
  1766.                0};
  1767.  
  1768.           FData2 Fld_fd2_0;
  1769.  
  1770.           /***** Fld CODE *****/
  1771.  
  1772.  
  1773.  
  1774.  
  1775.                                       Page -27-
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.                          SSG Version 2.0 - Reference Manual
  1783.  
  1784.  
  1785.           main(void)
  1786.           {
  1787.           Cls(NColor,0,0,24,79);
  1788.           Box(NColor,0,2,0,22,79);
  1789.           DrawBoxLine(NColor,0,4,0,4,79);
  1790.           DrawBoxLine(NColor,12,4,52,22,52);
  1791.           WriteScreen(NColor,3,33,Fld_str0);
  1792.           WriteScreen(NColor,6,56,Fld_str1);
  1793.           Fields2(F_INIT,Fld_fd1_0,&Fld_fd2_0);
  1794.           Fields2(F_COLORS,Fld_fd1_0,&Fld_fd2_0,NColor,RColor);
  1795.           Fields2(F_DRAW,Fld_fd1_0,&Fld_fd2_0);
  1796.           Fields2(F_ACTIVE,Fld_fd1_0,&Fld_fd2_0);
  1797.           }
  1798.  
  1799.           As you can see, the example programs are almost completely
  1800.           written for you.  The file created by SSG will contain all the
  1801.           data and code needed to produce the screens.  Your program is
  1802.           ready to be compiled. Of course, most of the times you will want
  1803.           to modify, add or continue programming using the structures
  1804.           created for you by SSG.
  1805.  
  1806.           LICENSE
  1807.  
  1808.           SSG is a copyrighted material and is NOT a Shareware or User
  1809.           Supported product. SSG is supplied to all registered users of the
  1810.           SCL1 library, as part of the registration package and should not
  1811.           be freely distributed or copied except for backup purposes. All
  1812.           registered users are granted a non exclusive license to use this
  1813.           program for any use.  The Shareware version of the SCL1 library
  1814.           (which does not include SSG) may be freely distributed.
  1815.  
  1816.           This program has been thoroughly tested and, to the best of our
  1817.           knowledge, perform as this documentation describe. We cannot
  1818.           accept any responsibility for any problems which may occur
  1819.           through its use. After examining this document and other included
  1820.           file, if you feel that this program is not suitable for your use,
  1821.           please do not use it.
  1822.  
  1823.           DISCLAIMER
  1824.  
  1825.           THIS SOFTWARE AND MANUAL ARE SOLD "AS IS" AND WITHOUT WARRANTIES
  1826.           AS TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER WARRANTIES
  1827.           WHETHER EXPRESSED OR IMPLIED. BECAUSE OF THE VARIOUS HARDWARE AND
  1828.           SOFTWARE ENVIRONMENTS INTO WHICH THIS PROGRAM MAY BE PUT, NO
  1829.           WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS OFFERED.
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835.                                       Page -28-
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.                          SSG Version 2.0 - Reference Manual
  1843.  
  1844.  
  1845.           GOOD DATA PROCESSING PROCEDURE DICTATES THAT ANY PROGRAM BE
  1846.           THOROUGHLY TESTED WITH NON-CRITICAL DATA BEFORE RELYING ON IT.
  1847.           THE USER MUST ASSUME THE ENTIRE RISK OF USING THE PROGRAM. ANY
  1848.           LIABILITY OF THE SELLER WILL BE LIMITED EXCLUSIVELY TO PRODUCT
  1849.           REPLACEMENT OR REFUND OF PURCHASE PRICE.
  1850.  
  1851.           Feel free to send any comments or suggestions. If you find any
  1852.           bugs please let us know so that they can be traced and fixed.
  1853.           Please include with your comments any relevant information, such
  1854.           as; hardware configuration, description of the bug or problem and
  1855.           if possible a section of the problem code.  Write to:
  1856.  
  1857.                          José Rodríguez Alvira
  1858.                          El Monte Sur 190, Apt. B-342,
  1859.                          Hato Rey, Puerto Rico, 00918
  1860.  
  1861.           The latest version of SCL1, sample programs and comments about
  1862.           these programs are available in:
  1863.  
  1864.                          TECH BBS (Sysop: José Romero)
  1865.                          (809)732-2322
  1866.  
  1867.           You can leave any comments, suggestions or questions in this BBS. 
  1868.           We will reply these messages in the same BBS.
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.                                       Page -29-
  1896.  
  1897.